Post

Replies

Boosts

Views

Activity

SwiftuI view Error
Hi Im copying the Apple tutorial project for lists and navigation for SWiftUI but Im getting an error although my code is same as Apple project, can some one check please. Error "Cannot find 'landmarks' in scope" Kindest Regards import SwiftUI struct LandmarkRow: View {     var landmark: Landmark     var body: some View {         HStack {             Text(landmark.name)         }     } } struct LandmarkRow_Previews: PreviewProvider {     static var previews: some View {         LandmarkRow(landmark: landmarks[0])     } } import Foundation import SwiftUI import CoreLocation struct Landmark: Hashable, Codable {     var id: Int     var name: String     var park: String     var state: String     var description: String          private var imageName: String     var image: Image {         Image(imageName)     }          private var coordinates: Coordinates          var locationCoordinate: CLLocationCoordinate2D {         CLLocationCoordinate2D (             latitude: coordinates.latitude,             longitude: coordinates.longitude)     }          struct Coordinates: Hashable, Codable {         var latitude: Double         var longitude: Double     }      }
2
0
982
Mar ’21
Degrees of Gray on iOS APPS
Hi so based on Apple UIG I should use degrees of transparency to get degrees of gray ? So to apply that on a label for example or text I make them black color then apply transparency on the control element it self ? kindest Regards
1
0
935
Jan ’22
Changing Modifiers by Code
Hi suppose I have 2 buttons button1 and button2 and when button2 is tapped I want to change button1 colors and it’s text, how to do that ? How to reference to button1 and change its modifiers ? now also suppose button one was a text such as Text(“Some Text”), how to change text shown between brackets when button2 is tapped ? Kindest Regards
1
0
404
Feb ’22
placeholderText Color
Hi Theres colors to use in SwiftUI when developing iOS App such as first line, but when I try to use the other system color placeholderText I get the error "Type Color? has no member placeholderText" why ? Text("Hello, World!").foregroundColor(.quaternaryLabel)
3
0
630
Jun ’22